<template>
  <v-iframe :src="getLink()" />
</template>
<script setup>
import router from '@/router'
const getLink = () => {
  let url = router.currentRoute.value.query.help
  //console.log(router.currentRoute.value)
  // 使用正则表达式判断URL是否以"http"前缀开头
  if (/^http:\/\/|^https:\/\//.test(url)) {
    //包含 http 直接打开
    window.open(url, '_blank')
  } else {
    return '/docs/' + url + '.html' // URL没有"http"前缀，拼接相对路径
  }
}
</script>
